<?php
namespace Plugin\Gq\VideoMonitoring\Schema;

use Plugin\Gq\VideoMonitoring\Model\GqVideoType;
use Hyperf\Swagger\Annotation\Property;
use Hyperf\Swagger\Annotation\Schema;

/**
 * 摄像头分类
 */
#[Schema(title: 'GqVideoTypeSchema')]
class GqVideoTypeSchema implements \JsonSerializable
{
    #[Property(property: 'id', title: 'id', type: 'bigint')]
    public string $id;

    #[Property(property: 'name', title: '分类名称', type: 'varchar')]
    public string $name;




    public function __construct(GqVideoType $model)
    {
       $this->id = $model->id;
       $this->name = $model->name;

    }

    public function jsonSerialize(): array
    {
        return ['id' => $this->id ,'name' => $this->name];
    }
}